<template>
  <!-- 详情 -->
  <el-dialog title="IC卡备案管理详情" :visible.sync="dialogVisible" width="50%" append-to-body :close-on-click-modal="false"
             :before-close="closedialog">
    <el-descriptions :column="2" border>
      <el-descriptions-item>
        <template slot="label">
          物理卡号
        </template>
        {{ form.physicalId }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          IC卡号
        </template>
        {{ form.cardNo }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          ic卡状态
        </template>
        <dict-tag :options="dict.type.start_stop_status" :value="form.status"/>
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          加密方式
        </template>
        <dict-tag :options="dict.type.ic_card_sources_type" :value="form.dataType"/>
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          持卡人
        </template>
        {{ form.owner }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          场所代码
        </template>
        {{ form.fieldCode }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          场所名称
        </template>
        {{ form.fieldName }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          创建时间
        </template>
        {{ form.createTime }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          创建人
        </template>
        {{ form.createBy }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          更新时间
        </template>
        {{ form.updateTime }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          更新人
        </template>
        {{ form.updateBy }}
      </el-descriptions-item>
    </el-descriptions>
    <div slot="footer" class="dialog-footer" style="text-align: center;">
      <el-button @click="closedialog">关闭</el-button>
    </div>
  </el-dialog>
</template>

<script>
  import {getIcCardRecord} from "@/api/billsdecl/icCardRecord";

  export default {
    props: {
      dict: {}
    },
    data() {
      return {
        //显示详情
        dialogVisible: false,
        form: {
          id: null,
          physicalId: null,
          cardNo: null,
          status: null,
          dataType: null,
          owner: null,
          fieldCode: null,
          fieldName: null,
          createTime: null,
          createBy: null,
          updateTime: null,
          updateBy: null
        }
      }
    },
    methods: {
      open(row) {
        this.dialogVisible = true;
        this.loadDetail(row);
      },
      closedialog() {
        this.dialogVisible = false
      },
      // 获取详情
      loadDetail(row) {
        getIcCardRecord(row.id).then((res) => {
          if (res.code == 200) {
            this.form = res.data;
          }
        });
      },
    }
  };
</script>

<style>

</style>
